$( document ).ready(function( event ) {
	$.ajax({
	  	url: rootPath+"/managers/loadDept.mge",
	  	type: "POST",
	  	dataType: "text",
	  	success: function( response ) {
	  		var data=$.parseJSON(response);
			if(data.state=="200"){
		  		var dept=data.data.length;
		  		for(var i = 0; i < data.data.length; i++){
		  			if(data.data[i].dept_id == $("#dept_id").val()){
		  				$("<option selected value='"+data.data[i].dept_id+"'>"+data.data[i].dept_name+"</option>").appendTo("#dept");
		  			}else{
		  				$("<option value='"+data.data[i].dept_id+"'>"+data.data[i].dept_name+"</option>").appendTo("#dept");
		  			}
		  		}
			}else{
				alert('fail',data.msg);
			}
	  	}
	});

});